home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / printing / lazbrain.arc / LASER_E.TXT < prev    next >
Text File  |  1991-08-14  |  84KB  |  1,931 lines

  1.                                 LASERBRAIN
  2.  
  3.                                     the
  4.  
  5.                      ATARI SLM804 Laser Printer Driver
  6.  
  7.                                version 1.31
  8.  
  9.                              March 25th , 1989
  10.  
  11.  
  12.  
  13.                   written by: Klaus Garms & Pierre Hansen
  14.  
  15.                              produced by: DMC
  16.  
  17.                        Design-Marketing-Comunication
  18.                             Schöne Aussicht 41
  19.                                 6229 Walluf
  20.                                West Germany
  21.  
  22.  
  23.                         Documentation translated by
  24.  
  25.                        Stephan Muhs & Dagmar Livora
  26.                               Wilhelmstr. 51
  27.                               5000 Cologne 60
  28.                                West Germany
  29.  
  30.  
  31.                             Copyright (c) 1989
  32.  
  33.                                 ATARI Corp.
  34.                             1196 Borregas Ave.
  35.                             Sunnyvale, CA 94086
  36.  
  37.  
  38.  
  39.  
  40.  
  41. This software is released as FREEWARE. This means that you can give
  42. it away to Atari owners free of charge. Atari neither implies nor 
  43. expresses any warranty or future upgrades to this software. LaserBrain
  44. is given away freely in an "as is" state.
  45.  
  46. GETTING STARTED
  47.  
  48. In  order  to use LASERBRAIN,  you'll first need to set  up  your  computer 
  49. system and laser printer.  You should have the following components in your 
  50. system:
  51.  
  52.  
  53. * Atari MEGA or ST computer
  54.  
  55. * Atari double-sided floppy disk drive and formatted disks
  56.  
  57. * Atari SH hard disk drive (optional)
  58.  
  59. * Atari monochrome monitor
  60.  
  61. * Atari SLM804 Laser printer and SLMC804 controller
  62.  
  63. Set up your computer and laser printer,  following the instructions in your 
  64. owner's  manuals.  Before  using  LASERBRAIN,  make sure  to  have  a  good 
  65. knowledge  of your Atari computer and laser printer and therefore read  the 
  66. owner's manuals supplied  with the equipment. 
  67.  
  68. It is essential for you to copy the LASERBRAIN disk and store the  original 
  69. disk as your backup copy.  This will protect you from loosing the  original 
  70. disk  or  damaging  its  contents.  If you have  a  hard  disk,  then  copy 
  71. LASERBRAIN into the root directory of drive C.  Always work with your copy. 
  72. Store  the  original disk in a safe place protected  from  dust,  moisture, 
  73. direct  sunlight  and  sources  of electric  power  or  magnetism.  If  the 
  74. information  on your working disk is damaged or accidentially  erased,  use 
  75. your LASERBRAIN original disk for a new copy.
  76.  
  77.  
  78.  
  79. INTRODUCTION
  80.  
  81. The  Atari  SLM804  Laser  printer  is  just  another  example  of  Atari's 
  82. policy  of  "Power Without The Price".  Now,  for the first  time,  a  high 
  83. quality  laser  printer  is available at the price  of  a  good  dot-matrix 
  84. printer.
  85.  
  86. Even  the  best  hardware is almost useless if it  doesn't  go  along  with 
  87. existing and common software.  Since the SLM804 will only work in  graphics 
  88. mode (with the graphics data in a special format),  you will need a special 
  89. driver to create this format.
  90.  
  91. That's the reason why LASERBRAIN was created.  It is supposed to work  with 
  92. almost every known program and to be easy to handle.  Besides  this,  every 
  93. user  should  have  the possibility to  customize  the  program's  features 
  94. according to his demands.
  95.  
  96.  
  97. HOW DOES LASERBRAIN WORK?
  98.  
  99. LASERBRAIN is installed as a desk accessory in the memory of your Atari ST. 
  100. It  intercepts  all output to the printer port which is made by  using  the 
  101. standardized   OS calls and re-directs it to the LASERBRAIN  buffer,  where 
  102. the  information  is stored until the page is ready to  be  printed.  While 
  103. printing,  the  data  is converted into a format appropriate to  the  laser 
  104. printer.  Special  assembler  routines are used to provide this  very  fast 
  105. conversion.  This means that just a small part of the usually needed buffer 
  106. (about one megabyte) is required.
  107.  
  108. LASERBRAIN  is controlled by control codes and escape sequences  compatible 
  109. with  IBM  dot-matrix printers.  As almost every existing program  for  the 
  110. Atari ST is fully compatible with these control sequences,  LASERBRAIN  can 
  111. be used with these applications without need for further modifications.
  112.  
  113. LASERBRAIN also includes a number of enhancements,  making it possible, for 
  114. example,  to  enlarge  and  reduce  the  size  of  graphics  output  of  an 
  115. application program.
  116.  
  117. LASERBRAIN also provides full support for the ST screen dump routine, which 
  118. can be activated at any time by pressing the <ALTERNATE>+<HELP> keys.
  119.  
  120.  
  121. IMPORTANT INFORMATION ABOUT WORKING WITH THE ATARI SLM804
  122.  
  123. Make sure to turn on your laser printer before turning on your computer and 
  124. never have the printer turned off while working with your computer!!!  When 
  125. turned  off,  the  printer controller disturbs the data-flow   between  the 
  126. computer  and the floppy or hard-disk.  Because of this,  loss of data  may 
  127. occur.
  128.  
  129. So  if  you  don't need your laser printer,  turn  it  on  nevertheless  or 
  130. disconnect the plug from the DMA-port of the computer, while both units are 
  131. switched off !
  132.  
  133. HINT:  If your printer is connected (and switched on),  you can get rid  of 
  134. the  fan's noise by opening the printer's housing lid at the back  just  so 
  135. much that heater and fan are automatically switched off.  This is not  very 
  136. elegant, but it works and is not dangerous.
  137.  
  138.  
  139. MANUAL INSTALLATION
  140.  
  141. To install LASERBRAIN,  you need LASER_E.ACC on your boot disk.  Make  sure 
  142. that no more than six accessories are installed at the same time.
  143.  
  144. Now  restart the system and LASERBRAIN will be loaded and then be ready  to 
  145. be activated.  Like this,  the programm will remain completely inactive and 
  146. occupy about 30 kbytes of RAM.
  147.  
  148. If you want to activate LASERBRAIN,  just click on LASERBRAIN in the "DESK" 
  149. menu.  (To avoid difficulties with TOS, please install LASERBRAIN only from 
  150. the  desktop and not from within an already  running  program).  LASERBRAIN 
  151. will  prompt  you with a dialog box asking for the  required  buffer  size. 
  152. Enter the size of buffer you need for fonts, texts and/or graphics. Keep in 
  153. mind  to leave a minimun of 128K for other applications.  The quantity  may 
  154. either be given in bytes or,  by adding a "K" suffix,  in kbytes. So wether 
  155. you enter"1024000" or "1000K", the effect is just the same.
  156.  
  157. In  case of having requested too much or too little memory for the  buffer, 
  158. LASERBRAIN will respond with an error dialog(see Error Messages ), allowing 
  159. you to abort the installation or try again with a new value.
  160.  
  161. If  you  find  yourself working with an application and  having  called  up 
  162. LASERBRAIN  accidentially,  type "0" as the required quantity to abort  the 
  163. installation ( the majority of programms will not,  unfortunately, tolerate 
  164. an accessory requesting memory while they are in use).
  165.  
  166. If  the  installation  was successful,  the  printer  driver  displays  the 
  167. appropriate  dialog box and waits for any key to be pressed.  If you  don't 
  168. want  this additional 'press any key' request,  input an "=" as  the  first 
  169. character when specifying the buffer size (e.g.  "=600K").  This especially 
  170. is recommended for automatic installation.
  171.  
  172.  
  173. AUTOMATIC INSTALLATION
  174.  
  175. You  may,   if  you  wish,  completely  automate  the  installation.  After 
  176. LASERBRAIN  has  been loaded from the boot-disk,  it will search  the  root 
  177. directory for a configuration file called LASBRAIN.BAT.  If this file can't 
  178. be found, LASERBRAIN must be manually installed (see Manual Installation )
  179. If this file is found, LASERBRAIN automatically reserves the desired buffer 
  180. size, the screen dump factor is set and the given fonts are loaded.
  181.  
  182. Therefore a configuration file like this is needed:
  183.  
  184. =600K               (buffer size)
  185. 4                   (hardcopy size)
  186. B:\FONTS\ELITE.DRF  (font or configuration file)
  187.  
  188. Here the first line is used to set the buffer size, the second contains the 
  189. hardcopy  enlargement  factor (1-5) and the third gives  the  pathname  and 
  190. filename of the fonts to be loaded.If the font file is located in the  same 
  191. directory  as the accessory,  the pathname may be omitted. (Rules  for  the 
  192. loading of fonts see Using LASERBRAIN )
  193.  
  194. Only  one font file can be loaded.  If you want to load a number of  fonts, 
  195. you must first combine them to form a single configuration file (see  Using 
  196. LASERBRAIN: Loading Fonts ).
  197.  
  198. The overall length of the text file may not exceed 126 characters.  It  can 
  199. be  created  by using any text editor or word processor (e.g.  1st  Word  / 
  200. Wordplus  {with  WP mode turned off!},  Tempus or micro-Emacs)  capable  of 
  201. saving files in plain ASCII format.
  202.  
  203.  
  204. SELECTING THE BUFFER SIZE
  205.  
  206. How big a buffer does LASERBRAIN need?
  207.  
  208. Storing a full DIN A4 page {translator's remark:  DIN A4 is a european page 
  209. size,  somewhere between LETTER and LEGAL sizes.  It might be neccessary to 
  210. reserve  more buffer space for LEGAL sized pages.} would  normally  require 
  211. almost  one  megabyte of RAM.  However,  with the use of  highly  optimised 
  212. graphics routines,  LASERBRAIN remarkably reduces the required buffer size. 
  213. Note  that the amount of buffer space required depends on the kind of  data 
  214. to be printed. 
  215.  
  216. As  already  mentioned,  the data being sent to the laser  printer  is  not 
  217. converted  to  a suitable form until printing  has  actually  started.  The 
  218. faster this conversion takes place, the smaller the buffer for intermediate 
  219. storing  may be.  Printing text is relatively rapid and therefore does  not 
  220. require  a  large  buffer.  If the page to be printed  contains  a  lot  of 
  221. graphics, or if you require a scaled screen dump, the conversion takes more 
  222. time and therefore will require a larger buffer.
  223.  
  224. The table below shows typical buffer sizes:
  225.  
  226. Buffer    Type of output
  227.  
  228.   40K     hardcopies in sizes 3 to 5
  229.  100K     text output containing some graphics
  230.  270K     hardcopies in any size
  231.  600K     a full DIN A4 page containing med/low res. graphics
  232. >=1MB     a full DIN A4 page containing high res. graphics
  233.  
  234. If  the  buffer size is not large enough,  the page will not  appear  as  a 
  235. continuous image,  but will be interrupted by one or more stripes,  varying 
  236. in  width,  of  an irregular grey pattern.  The number and width  of  these 
  237. stripes may,  with a little practice,  be used to estimate how much storage 
  238. space the emulator actually requires for a correct print-out.
  239.  
  240. Because of the variety of possible applications,  there is no general  rule 
  241. as to buffer size,  nor is there a "standard size".  But after  short,  you 
  242. will  be  able  to  estimate in advance how much space  to  reserve  for  a 
  243. particular print-out.
  244.  
  245. Keep  in mind,  that the sizes shown above are meant without fonts  and  so 
  246. please add an appropriate size to the required buffer.  You  can,  however, 
  247. clear the buffer by deleting any fonts not needed for the print-out.
  248.  
  249. Note:  you will find that the free buffer size as shown in the accessory is 
  250. about 35K less than reserved.  The reason is, that in addition to it's main 
  251. buffer, LASERBRAIN requires a temporary graphics buffer while printing. The 
  252. minimum size for this buffer is 35K.
  253.  
  254.  
  255.  
  256.  
  257. HARDCOPIES
  258.  
  259. With  an active LASERBRAIN it is possible to have a hardcopy of the  screen 
  260. at  any time (except while reading/writing from/to floppy or  harddisk)  by 
  261. pressing the <ALTERNATE> & <HELP> keys at the same time. You can enlarge or 
  262. reduce  the  size of the printed image by choosing a  screen  dump  scaling 
  263. factor as shown in the table below. The printed hardcopy is also rotated by 
  264. 90 degrees to provide an optimum usage of the paper size.
  265.  
  266. The following sizes are available:
  267.  
  268. scaling        horizonal      vertical       minimum
  269. factor         size (cm)      size (cm)      buffer size
  270.  
  271.   1              3.39            5.42          180K
  272.   2              6.77           10.84          270K
  273.   3             10.16           16.26           40K
  274.   4             13.55           21.67           40K
  275.   5             16.93           27.09           40K
  276.  
  277. To  print the various hardcopies,  different buffer sizes  are  needed.  If 
  278. there is not enough space left for a small hardcopy,  LASERBRAIN will  show 
  279. the appropriate error-dialog (see:  Error Messags ). You may then choose to 
  280. try again with a larger scaling factor or abort the screen dump altogether.
  281.  
  282.  
  283. USING LASERBRAIN
  284.  
  285. If  you  have already installed the emulator,  clicking on  the  LASERBRAIN
  286. accessory will produce the emulator's main configuration dialog.
  287.  
  288. The configuration dialog has three main parts:
  289.  
  290. *  The top of the dialog provides information about the total buffer  size, 
  291. the  free space within the buffer available to store fonts and  page  data, 
  292. and  the size of the current page (see:  Printing with LASERBRAIN for  more 
  293. details).
  294.  
  295. * The left hand side of the dialog provides information about the style and 
  296. attributes of the active font.
  297.  
  298. *  The right hand side of the dialog contains a series of buttons  used  to 
  299. access various functions supported by the emulator (see below). The buttons 
  300. are   accessed  either  by  clicking  on  them  or  through  the   keyboard 
  301. equivalents.
  302.  
  303. (Feel  free  to  make  a  hardcopy of the main  dialog  box  for  a  better 
  304. understanding of the text.)
  305.  
  306. load font/configuration       key:<INSERT>
  307.      allows  you  to load one or more fonts from disk.  The new  fonts  are 
  308.      attached  to the end of the current font list.  Note that loading  new 
  309.      fonts clears the current page from the buffer!
  310.      This  function will also load most GDOS fonts and convert them to  the 
  311.      emulator's internal format. This gives you access to a large number of 
  312.      existing  font  styles  and sizes and also enables you  to  create  or 
  313.      modify emulator fonts by using a GDOS font editor (e.g. Fontz ...).
  314.  
  315. save configuration            key:<#>
  316.      creates  a  single configuration file containing all  fonts  currently 
  317.      loaded into the emulator along with their font numbers and attributes. 
  318.      Using  this  option  allows you to compile a series of  fonts  into  a 
  319.      single file suited to your needs. 
  320.  
  321. delete font                   key:<DELETE>
  322.      deletes the active font from the emulator's buffer.  The current  page 
  323.      is also deleted.  Your configuration file will not be effected  unless 
  324.      you resave it afer having deleted a font.
  325.  
  326. delete/clear page             key:<CLR/HOME>
  327.      clears the contents of the page buffer.
  328.  
  329. print page                    key:<*>
  330.      prints the current page and clears the page buffer.
  331.  
  332. laser off                     key:<UNDO>
  333.      activates and de-activates the emulator.  If the 'laser off' button is 
  334.      inverted  (black)  the emulator is suspended and data is sent  in  the 
  335.      usual way to the computer's Centronics port. This option allows you to 
  336.      operate  a conventional dot-matrix printer alongside with  your  Atari 
  337.      laser, switching between the two by using the 'laser off' button.
  338.  
  339. 1..5                          key:<1>..<5>
  340.      selects the scaling factor used in producing hardcopies.
  341.  
  342. previous font                 key:<cursor up>
  343.      moves  an  imaginary cursor up in the font list,  selecting  the  font 
  344.      before the current font.  As a font is selected from those resident in 
  345.      the  emulator's  buffer,  the  name of this font is  inserted  in  the 
  346.      "active font" box.
  347.  
  348. next font                     key:<cursor down>
  349.      moves  an imaginary cursor down in the font list,  selecting the  font 
  350.      after the current font.  As a font is selected from those resident  in 
  351.      the  emulator's  buffer,  the  name of this font is  inserted  in  the 
  352.      "active font" box.  
  353.  
  354. active font                   key:<space bar>
  355.      produces a window showing all or some of the characters in the  active 
  356.      font.  Additional  information about the active font is shown  at  the 
  357.      bottom of the window, including:
  358.  
  359.      *    The number of characters contained within the font
  360.      *    The  maximum width of the characters within the font in units  of 
  361.           1/300th  of  an  inch.  This information is used  to  define  the 
  362.           character density (see: Printing Text with LASERBRAIN )
  363.      *    The  height  of the font in units of 1/300th  of  an  inch.  This 
  364.           information is used whenever the AUTO LINE FEED option is enabled 
  365.           (see: Other Commands).
  366.      *    The maximum number of lines that would fit onto a page using this 
  367.           font.
  368.  
  369.      Pressing the left mouse button  or pressing any key will exit from the 
  370.      font window to the main dialog.
  371.  
  372. font number                   key:<cursor left/right>
  373.      increases  or  decreases the font number associated  with  the  active 
  374.      font.  The  font  number  is  used by the  emulator  to  define  which 
  375.      attributes are to be used with the active font.
  376.      Clicking on the font number itself will return it to 1.
  377.      For  more  information  see:   Printing  Text  with  LASERBRAIN    and 
  378.      Otrher Commands.
  379.  
  380. font attributes               key:<F1>..<F6>,<F8>
  381.      will  set the attributes for the active font.  In practice this  means 
  382.      that the font will be activated if the same combination of  attributes 
  383.      has been selected by the application.
  384.      For  example,  if  a particular font has the  italics  and  emphasized 
  385.      buttons selected (irrespective of wether that font is active or  not), 
  386.      sending  the  control  sequences  for Italic On and  Bold  On  to  the 
  387.      emulator will select that font (see: Printing Text with LASERBRAIN  ).
  388.  
  389. exit                          key:<RETURN>
  390.      clears the emulator's configuration dialog and returns control to  the 
  391.      application or GEM Desktop.
  392.  
  393.  
  394. PRINTING WITH LASERBRAIN
  395.  
  396. One  important  thing to learn about laser printers is  that,  unlike  dot-
  397. matrix printers,  they print a whole page at a time. In practice they build 
  398. up  a  page of text and/or graphics and only start to print the  page  when 
  399. it's  full or when they are told to.Whenever you have a small text file  or 
  400. document  you  need  to indicate that you want to print  the  current  page 
  401. without filling it up.
  402.  
  403. LASERBRAIN  will  start printing a page when one of  the  following  things 
  404. happens:
  405.  
  406.      *    The  Print  Page  button  in  the  emulators  control  dialog  is 
  407.           selected.
  408.  
  409.      *    A Form Feed control character <FF> is received by the emulator or
  410.  
  411.      *    The emulator 'discovers' that the next line of text will not  fit 
  412.           onto the current page.
  413.  
  414. Once a laser has started printing,  it is unable to stop in the middle of a 
  415. page and then resume printing. Whatever happens, it must allow the sheet to 
  416. run through at constant speed.
  417.  
  418. You can check whether the page buffer still contains data - e.g. at the end 
  419. of  a long document - by checking the current page size at the top  of  the 
  420. emulators  control dialog.  If the page size is  non-zero,  the  emulator's 
  421. buffer still contains some data.
  422.  
  423.  
  424. HOW TO USE THE PRINTER'S MANUAL FEED
  425.  
  426. It is possible to feed the SLM804 manually:
  427.  
  428.      *    Pull the paper tray until the red 'add paper' sign appears.
  429.  
  430.      *    Start printing.
  431.  
  432.      *    When the green 'ready' sign appears, please insert a single sheet 
  433.           of  paper  ensuring that it is pushed up  against  the  left-hand 
  434.           paper guide. Make shure that the side to be printed on shows up.
  435.  
  436.      *    The printer automatically draws in the sheet of paper and  starts 
  437.           printing.
  438.  
  439. Note:  the maximum page size the printer can handle in this mode is  LETTER 
  440. size.  So if you use DIN A4 or LEGAL sized sheets,  the printer will handle 
  441. them as Letter sized sheets, too.
  442.  
  443.  
  444. PRINTING TEXT WITH LASERBRAIN
  445.  
  446. One  of  the major advantages of a laser printer compared to  a  dot-matrix 
  447. printer  is  undoubtedly being able to obtain letter quality  output  at  a 
  448. higher speed and with less noise.
  449.  
  450. LASERBRAIN  also provides the flexibility of loading additional styles  and 
  451. sizes of fonts from floppy or hard disk.  The maximum number of fonts  that 
  452. can be used at the same time is 256.  In practice, the only limitations are 
  453. imposed by the amount of memory available.
  454.  
  455. The  various  fonts  held  in the emulator's  buffer  are  selected  either 
  456. manually  by selecting a font using the emulator's control  dialog,  or  by 
  457. sending  a series of control codes that tell the emulator to  switch  fonts 
  458. while printing.
  459.  
  460. In order to simply print with LASERBRAIN it is not absolutely neccessary to 
  461. read  the  following  section.  The configuration file  provided  with  the 
  462. emulator will be suitable for use with most applications.
  463. However,  if  you  want  to  create your  own  configurations  for  special 
  464. applications, the following information will be of interest:
  465.  
  466. A font may be selected by using control codes that represent the  following 
  467. attributes:
  468.  
  469.      *    letter quality
  470.      *    proportional spacing
  471.      *    ELITE print width (the default is PICA)
  472.      *    condensed
  473.      *    expanded
  474.      *    subscript
  475.      *    superscript
  476.      *    bold
  477.      *    italics
  478.  
  479. Each  of  these features can be turned on or off  individually  (using  the 
  480. standardized Epson compatible control codes) or jointly with others  (using 
  481. the  expanded control codes 'set font' and 'set  style').  LASERBRAIN  then 
  482. tries  to  locate  a font in its buffer that has  attributes  matching  the 
  483. current control code settings.
  484.  
  485. Each font held in the emulator's buffer carries an identification.  This ID 
  486. has  two  parts:  the font number and the font attributes.  Both  of  these 
  487. parameters can be set for each font individually.  From the font number the 
  488. emulator can tell whether the font should be used where letter quality (LQ) 
  489. and/or proportionally spaced output is requested.
  490.  
  491.      LQ        prop.          font no. used
  492.  
  493.      no        no                  1
  494.      yes       no                  2
  495.      no        yes                 3
  496.      yes       yes                 4
  497.  
  498. The  font  attributes  tell  the emulator  for  which  combination  of  the 
  499. remaining seven attributes the font should be used.
  500.  
  501. If  you,  for example,  use the standard control code to switch  to  letter 
  502. quality  (<ESC>"x"1),  and proportional spacing is  disabled,  the  printer 
  503. driver  activates the font that carries a font number of 2 (see table)  and 
  504. has font attributes that correspond with the remaining seven settings.
  505.  
  506. If  the  buffer  does not contain a font  that  meets  these  requirements, 
  507. LASERBRAIN either uses the system character set (YORK 16) or,  if the font 
  508. number was located,  but there is no font with matching attributes, it uses 
  509. the  font that can be found with the largest number of matching  attributes 
  510. and which has no undesired attributes set. If a font without any attributes 
  511. set  is requested,  but all fonts currently installed have attributes  set, 
  512. the system character set (YORK 16) will be selected. 
  513.  
  514. The  emulator  only  recognizes a font by its  font  number  and  attribute 
  515. settings,  it  is  not  at all concerned with what  the  font  in  question 
  516. actually  looks like.   You can therefore declare a quite ordinary font  as 
  517. bold and italic by setting the bold and italic attribute flags from  within 
  518. the emulator's control dialog.
  519.  
  520. Three of the attributes covered above have an additional effect.  With dot-
  521. matrix printers, these attributes usually operate as follows:
  522.  
  523.      *    Elite  sets the character width to print 12 characters  per  inch 
  524.           (12 CPI). If Elite is switched off the printer is set at Pica (10 
  525.           CPI).   
  526.      *    Condensed  print increases the character density by a  factor  of 
  527.           1.7 by reducing the character size accordingly.
  528.      *    Expanded print doubles the width of all characters.
  529.  
  530. These  three attributes may be combined in various ways.  The  table  below 
  531. shows the corresponding effects:
  532.  
  533. ELITE       CONDENSED       EXPANDED       CPI       CHAR./LINE (A4 page)
  534.  
  535.  off           off             off         10.0         78 Chrs
  536.  on            off             off         12.0         94 Chrs
  537.  off           on              off         17.6        138 Chrs
  538.  on            on              off         21.4        167 Chrs
  539.  off           off             on           5.0         39 Chrs
  540.  on            off             on           6.0         47 Chrs
  541.  off           on              on           8.8         69 Chrs
  542.  on            on              on          10.7         84 Chrs
  543.  
  544. If  proportional spacing is switched off,  LASERBRAIN tries to  locate  the 
  545. appropriate  font  and adjust the character spacing to obtain  the  desired 
  546. character  density as shown above.  Note that this overrides any  character 
  547. spacing set by using 1B 03 [n].
  548.  
  549. If the selected font is too wide to achieve the desired character  spacing, 
  550. the spacing is automatically set to 0 and adopts the current font's maximum 
  551. character  width  in  determining  character  spacing.  In  this  case  the 
  552. character density will not match the values shown in the table.
  553.  
  554. If proportional spacing is turned on, the corresponding font is choosen and 
  555. the emulator derives its character spacing from the value of byte  variable 
  556. 11  (0B  hexadecimal), the default value being 5/300ths of  an  inch.  For 
  557. further information see Other Commands.
  558.  
  559.  
  560. PRINTING GRAPHICS WITH LASERBRAIN
  561.  
  562. The  FULL  emulation  of a dot-matrix printer on  a  laser  printer  causes 
  563. certain problems,  particulary when handling graphics.  This is because the 
  564. Atari SLM804, along with most other laser printers, has a resolution of 300 
  565. dots per inch (dpi) in both directions.
  566.  
  567. Dot-matrix  printers  on  the other hand have a  large  number  of  varying 
  568. resolutions.  With  a 9-pin dot-matrix printer resolutions are  selectable, 
  569. starting with with a very basic 60 dpi horizontally and 72 dpi vertically.
  570.  
  571. To  emulate these resolutions on the Atari laser printer,  LASERBRAIN  uses 
  572. several laser pixels to simulate a single dot-matrix pixel.  However, since 
  573. the conversion factor is not always an integer (e.g.  300/72=4.1666..), two 
  574. adjacent pixels of identical resolution on a dot-matrix printer may,  using 
  575. the emulator,  appear to be of different sizes owing to inevitable rounding 
  576. off errors.  The difference will never be more than 1/300th of an inch, but 
  577. may still be visible, particulary where a page contains thin lines.
  578.  
  579. As  you will see from the section on Graphics Commands,  sixteen  different 
  580. graphics modes are available.  The first seven modes emulate those found on 
  581. dot-matrix  printers.  Details  of each mode are shown in  the  section  on 
  582. Graphics Commands.
  583.  
  584. Graphics  modes  3  and 8 support interlacing.  If these  modes  produce  a 
  585. striped print-out,  turn interlacing off (i.e. set the interlacing value to 
  586. zero).  If pages printed in modes other than 3 and 8 appear smudged,  using 
  587. one  of the interlaced modes with an interlaced value of 1/2 or 2/3 of  the 
  588. pixel height will sharpen the overall appearance of the page.
  589.  
  590. The  vertical  and horizontal resolutions of any graphics  mode  are  user-
  591. definable.  The horizontal resolution can be set from 18.75 dpi to 19660800 
  592. dpi, although in practice one would rarely use a resolution higher than the 
  593. maximum resolution the laser can support.  The redefinition can be achieved 
  594. by setting the corresponding grid variable.
  595.  
  596. It  is perfectly possible to reduce the size of an image by increasing  the 
  597. resolution  of a graphics mode,  however,  with resolutions above  300  dpi 
  598. pixels  are 'swallowed' at certain points to achieve  this  reduction.  The 
  599. emulator's  vertical  resolution  is also  user-definable  by  setting  the 
  600. appropriate grid variable, although in this case there is no lower limit of 
  601. 18.75 dpi.
  602.  
  603. By altering the horizontal and vertical resolutions you may set the  height 
  604. of individual pixels to suit your own requirements.  Using this approach it 
  605. becomes  very  easy  to  produce specialised  images  such  as  bar  codes. 
  606. Remember,  if you redefine the vertical resolution of a graphics mode  that 
  607. supports interlacing,  you will also need to modify the interlace value  to 
  608. suit the new resolution (if the the interlacing is non-zero).
  609.  
  610. If  your  application produces accurate images,  modifying  the  horizontal 
  611. and/or vertical resolutions will allow you to compensate for the difference 
  612. in  pixel  sizes between the Atari SLM804 and a  dot-matrix  printer.  When 
  613. tayloring a graphics mode,  bear in mind the maximum possible size for  the 
  614. paper  size  in  use.   See  the  section  on  Paper  Formats  for  further 
  615. information.
  616.  
  617. Example:  An application prints an image 400x640 pixels in size onto an DIN 
  618. A4 page.  The following program,  written in GFA basic, calculates and sets 
  619. the horizontal and vertical resolution. You would, therefore, use this or a 
  620. similar program to initialise the emulator before running the application.
  621.  
  622. mode = 3                 ! the application uses mode #3
  623. xmax = 2336              ! horizontal size of paper in pixels (DIN A4)
  624. xgraph = 400             ! horizontal size of image in pixels
  625. LPRINT CHR$(&1B);CHRS$(5);CHRS$(4*mode+1);MKL$(xmax/xgraph*65536);
  626.                          ! horizontal resolution adjustment
  627. ymax = 3386              ! vertical paper size in pixels (DIN A4)
  628. ygraph = 640             ! vertical size of image in pixels
  629. LPRINT CHR$(&1B);CHRS$(5);CHRS$(4*mode+1);MKL$(ymax/ygraph*65536);
  630.                          ! vertical resolution adjustment
  631.                          ! do not set interlacing
  632. LPRINT CHRS$(&1B);CHRS$(4*mode+2);MKL$(0);
  633. END                      ! program end
  634.  
  635.  
  636. PAPER FORMATS
  637.  
  638. The  Atari SLM804 is able to use standard copier paper and  heat  resistant 
  639. acetat sheets (at least 180 degrees centigrade). 
  640.  
  641. The maximum printable surface is normally as follows:
  642.  
  643. Format         Pixels        Size (inches)         Size (cms)
  644.  
  645. DIN A4
  646. horizontal      2336               7.79                19.78
  647. vertical        3386              11.29                28.68
  648.  
  649. DIN B5
  650. horizontal      2016               6.72                17.69
  651. vertical        2914               9.71                24.67
  652.  
  653. Letter/manual feed
  654. horizontal      2400               8.00                20.32
  655. vertical        3180              10.60                26.92
  656.  
  657. Legal
  658. horizontal      2400               8.00                20.32
  659. vertical        4080              13.60                34.54
  660.  
  661. The  Atari  laser printer identifies the current paper  format  from  three 
  662. small  grooves on the rear right hand side of the  paper  tray.  LASERBRAIN 
  663. automatically adjusts to the corresponding size,  so that the entire  paper 
  664. area  can be utilised with the exception of a small 1/4" border around  the 
  665. edge of the paper.
  666.  
  667. When  manual  feed is being used,  the printer cannot recognize  the  paper 
  668. format, and always assumes that it is printing on LETTER sized paper.
  669.  
  670.  
  671. ERROR MESSAGES
  672.  
  673. If  any problems are encountered while LASERBRAIN is  operating,  an  error 
  674. dialog  will be displayed describing the error.  The dialog normally  gives 
  675. you the option of trying the operation again after having removed the cause 
  676. of the error,  or cancelling the operation completely.  Clicking on  either 
  677. the left- or right-hand mouse buttons respectively will CANCEL or RETRY the 
  678. operation.
  679.  
  680. A list of possible error messages is shown below:
  681.  
  682.  
  683. PRINTER ERRORS
  684.  
  685. Please insert a disk to continue! 
  686.  
  687. This dialog will appear with an additional accustic signal.
  688. There is still a disk drive selected with no disk inside. This might happen 
  689. if  you  booted not from a disk,  but from the harddisk.  The  dialog  will 
  690. disappear  automatically  after  a  disk  has  been  inserted.  It  is  not 
  691. neccessary to press a key.
  692.  
  693.  
  694. The printer is not on-line/not connected! 
  695.  
  696. LASERBRAIN cannot locate a laserprinter attached to the DMA port.  Possible 
  697. reasons include:
  698.  
  699. *    the laser printer is not properly connected or not connected at  all. 
  700.      Check that all cables are connected correctly.
  701. *    the laser printer is not switched on. The printer must remain switched 
  702.      on at all times!
  703. *    the  laser printer's device I.D.  has been wrongly set in the  SLMC804 
  704.      controller box,  making it appear identical to another peripheral such 
  705.      as a harddisk.  The controller box's device I.D.  is factory-set to  7 
  706.      and hard disks are set to 0 or 1 so,  in theory, this situation should 
  707.      never arise.  LASERBRAIN sequentially searches all  eight possible DMA 
  708.      addresses  for a laser printer.  Maybe try again after having  <RESET> 
  709.      the system.
  710.  
  711.  
  712. General hardware error!
  713.  
  714. Please check that all lids of the printer's housing are closed and that all 
  715. cables are connected properly!
  716.  
  717.  
  718. Add toner! (continue printing?) 
  719.  
  720. The  laser  printer's  toner supply is running  low;  insert  a  new  toner 
  721. cartridge. There is still enough toner to print a few more pages. So if you 
  722. have  no  new  toner cartridge at hand,  press the right  mouse  button  to 
  723. 'repeat'.
  724.  
  725.  
  726. Still warming up! 
  727.  
  728. The  laser printer needs a short period of time to warm up after  switching 
  729. on.  Wait  until  the green light appears on the  printer's  control  panel 
  730. before  retrying.  If your printer continues to show a red light  for  more 
  731. than two minutes, there may be a hardware problem.
  732.  
  733.  
  734. Add paper! (You may use the manual feed instead) 
  735.  
  736. This error will appear immediately after the last page of the tray has been 
  737. used. Refill the paper tray and then press the key for 'cancel'
  738. If the tray has not been refilled,  LASERBRAIN will automatically wait  for 
  739. manual feed.
  740. 'Repeat' will print the last page once more.
  741.  
  742.  
  743. Replace drum! 
  744.  
  745. The laser printer's photo sensitive drum has malfunctioned or has not  been 
  746. inserted  properly.  Refer  to  your  owner's  manual  for  information  on 
  747. obtaining and fitting a replacement drum.
  748.  
  749.  
  750. Paper input jam! 
  751.  
  752. Paper is jammed in the paper feed. First check the paper tray to see wether 
  753. the  paper jam  has occured as the paper is fed into the printer.  If  this 
  754. area  is  clear open the printer housing by pulling upwards on  the  handle 
  755. just above the paper tray (see the laser printer owner's manual). Next tilt 
  756. the single sheet guide slightly upwards,  then pull it down forwards.  This 
  757. releases the paper feed, allowing you to remove any sheets that are jammed.
  758.  
  759.  
  760. Paper jam inside! 
  761.  
  762. Paper has jammed somewhere inside the laser printer.  To remove the  jammed 
  763. sheet,  open the housing by means of the handle at the front of the printer 
  764. (see the laser printer owner's manual).  Pull the sheet of paper out of the 
  765. printer as carefully as possible. It is likely that any image on the jammed 
  766. sheet  of paper will not yet have been fused resulting in a loose layer  of 
  767. toner  on the surface of the paper.  Avoid inhaling or touching  the  loose 
  768. toner  powder.  If  the sheet has jammed in the  fusing  unit,  the  fusing 
  769. rollers  may become contaminated.  See the section about Cleaning  in  your 
  770. laser printer owner's manual.
  771.  
  772.  
  773. Paper jam in paper stacker! 
  774.  
  775. Paper  has  jammed  in the stacker.  Lift the  laser  printer's  cover  off 
  776. backwards and check for jammed sheets of paper.  Carefully remove any paper 
  777. and  close the printer's rear cover.  When printing long documents,  it  is 
  778. recommended  that you only load about 50 sheets at a time.  This  may  mean 
  779. that you have to re-load a number of times,  but this is generally worth it 
  780. to avoid a document jam.
  781.  
  782.  
  783. Close cover! 
  784.  
  785. Make shure that the front and rear box lids are closed.
  786.  
  787.  
  788. Printer timeout!  (only with manual feed) 
  789.  
  790. Whenever you use the manual feed, you have to insert the page to be printed 
  791. on within a minute.  If not,  this error message will appear. If this error 
  792. appears  while  not  using the manual feed,  the will be an  error  of  the 
  793. following kind:
  794.  
  795. Fuser malfunction! 
  796. Imager malfunction! 
  797. Motor malfunction! 
  798. Video malfunction! 
  799. Controller has timed-out! 
  800.  
  801. Carefully check each of the cable connections in your system.  If you  fail 
  802. to  remedy one of these faults after a number of attempts,  try  restarting 
  803. your system completely. If the problem persists, contact your Atari dealer.
  804.  
  805.  
  806. Invalid command code! 
  807. Invalid device number! 
  808. Invalid parameter list! 
  809.  
  810. You may have a laser printer controller that is not fully compatible to the 
  811. SLMC804. If the problem persists, contact your Atari dealer.
  812.  
  813.  
  814. OPERATING FAULT ERROR MESSAGES
  815.  
  816. Buffer too small! 
  817.  
  818. The minimum buffer size is 40 kbyte.  You must reserve at least this amount 
  819. of memory for the buffer on installation.
  820.  
  821.  
  822. Buffer too large! 
  823.  
  824. Too much memory was reserved for the emulator's buffer during installation.
  825. Remember to leave at least 128K Bytes free for applications.
  826.  
  827.  
  828. File not found! 
  829.  
  830. The font or configuration file requested does not exist.
  831.  
  832.  
  833. File read error! 
  834.  
  835. The  font  or  configuration file requested  cannot  be  loaded.  The  disk 
  836. containing  the file may be damaged.  It may sometimes help to  remove  the 
  837. disk from the drive for a while before replacing it and retrying.
  838.  
  839.  
  840. Font buffer full!             
  841.                                    
  842. Insufficient   buffer   space  exists  to  load  the  requested   font   or 
  843. configuration file.
  844.  
  845.  
  846. File creation failed! 
  847.  
  848. The emulator's attempt to write a configuration file has failed. The file or the 
  849. disk may be write protected.
  850.  
  851.  
  852. File write error! 
  853.  
  854. The  emulator's attempt to write a configuration file has failed.  The disk  you 
  855. are trying to write to may be damaged. Retry with another disk.
  856.  
  857.  
  858. Disk Full!
  859.  
  860. LASERBRAIN's  attempt  to write a configuration or font file  to  disk  has 
  861. failed because the disk has no more space left.
  862.  
  863.  
  864. Page Full! 
  865.  
  866. The  current  page has become so large that there is no space left  in  the 
  867. buffer for additional graphics or text. The page must be deleted.
  868.  
  869.  
  870. Buffer not large enough for selected hardcopy size!
  871. CANCEL or RETRY with another size?
  872.  
  873. After  deducting  the size of the resident fonts and the  contents  of  the 
  874. current  page from the buffer size,  the remaining space in the  buffer  is 
  875. insufficient  for a screen dump in the requested size.  You may cancel  the 
  876. screen  dump by pressing the left mouse button.  If you depress  the  right 
  877. mouse  button  ("RETRY"),  the hardcopy will be made in the  next  possible 
  878. size.
  879.  
  880.  
  881.  
  882.  
  883. CONTROL CODES
  884.  
  885.  
  886. Terminology:
  887.  
  888. - all control codes are given in hexadecimal notation and in ASCII format.
  889.   ASCII codes will be denoted in pointed brackets and capital letters  (eg. 
  890.   <FF>).  Parameters  (variable values) will be denoted in square  brackets 
  891.   (eg.  [n]).  Digits  which  are not in parantheses  represent  the  ASCII 
  892.   character that has this decimal value (e.g.  0 means the ASCII  character 
  893.   with the value 00, the <NUL> character). 
  894.  
  895. - the character "#" signifies "number"
  896.  
  897. - the term "cursor" will be frequently used in this section.  Please  note 
  898.   that this does not refer to the screen cursor, but to an imaginary cursor 
  899.   that  points to the current position in LASERBRAIN's  page  buffer.  This 
  900.   corresponds  to  the  print head position of  a  traditional  dot  matrix 
  901.   printer. If you read, for example, "The cursor is moved down one line..." 
  902.   this means that subsequent characters will be printed one line down.
  903.  
  904. - LASERBRAIN  offers some extended commands,  which are not found  in  dot 
  905.   matrix printers. These commands are marked with a trailing "EXTRA:".
  906.  
  907.  
  908. VERTICAL POSITIONING
  909.  
  910. 0C 
  911. <FF>  
  912.       Formfeed.  The current page is printed out and then deleted from  the 
  913.       buffer.  The  emulator  then places its cursor at the  top  left-hand 
  914.       corner  of the new page.  The single-line expanded print function  is 
  915.       also cancelled.
  916.  
  917.       The  number of copies to be printed of a page is  adjustable.  Please 
  918.       refer to section on "Byte Variables" for further detail.
  919.  
  920.  
  921. 0A 
  922. <LF> 
  923.       Linefeed. The cursor will be moved down one line. The line spacing is 
  924.       preset at 1/6 inch,  but is user-definable. The AUTO LINE FEED option 
  925.       can  also be selected (please refer to the appropriate  section).  In 
  926.       this case,  the height of the current font will be added to the  line 
  927.       spacing.
  928.  
  929.  
  930. 1B 0A
  931. <ESC> <LF> 
  932.       Reverse line feed.  The cursor is moved up one line. The line spacing 
  933.       is  preset at 1/6 inch,  but is user-definable.  The AUTO  LINE  FEED 
  934.       option  can  also  be  selected  (please  refer  to  the  appropriate 
  935.       section).  In this case, the height of the current font will be added 
  936.       to the line spacing.
  937.  
  938.       Note:  Because of the way the emulator works,  subsequent text may be 
  939.       truncated  if  the buffer size is smaller than required  for  a  full 
  940.       graphics page.
  941.  
  942.  
  943. 1B 61 [n]
  944. <ESC> "a" [n]
  945.       The cursor is moved down [n] lines with the current line spacing.
  946.  
  947.  
  948. 1B 4A [n]
  949. <ESC> "J" [n] 
  950.       The  cursor moves down [n]*YGRID,  with YGRID being the current  grid 
  951.       spacing.  The default value for YGRID is 1/216 inch. 
  952.          
  953.  
  954. 1B 6A [n] 
  955. <ESC> "j" [n] 
  956.       The  cursor  moves up [n]*YGRID,  with YGRID being the  current  grid 
  957.       spacing.  The default value for YGRID is 1/216 inch.
  958.  
  959.       Note:  Because of the way the emulator works,  subsequent text may be 
  960.       truncated  if  the buffer size is smaller than required  for  a  full 
  961.       graphics page.
  962.  
  963.  
  964. 1B 30 
  965. <ESC> "0" 
  966.       Sets the line spacing to 27*YGRID.  Using the default value of YGRID, 
  967.       this will result in a line spacing of 1/8 inch.
  968.  
  969.  
  970. 1B 31
  971. <ESC> "1" 
  972.       Sets the line spacing to 21*YGRID.  Using the default value of  YGRID 
  973.       this will result in a line spacing of 1/72 inch.
  974.  
  975.  
  976. 1B 41 [n] 
  977. <ESC> "A" [n]
  978.       The  result  of  the  execution of  this  comand  depends  on  the 
  979.       emulation flag (byte variable 0C hex).
  980.  
  981.       NEW version (flag=0):
  982.        The line spacing is preset to to [n]*YGRID2. Using the default value 
  983.        of YGRID2 this gives a line spacing of 1/72 inch.
  984.        This preset must be activated with <ESC> "2" !
  985.  
  986.       OLD version (flag>0)
  987.        The setting will be effective imediately.
  988.  
  989.  
  990. 1B 32 
  991. <ESC> "2"      
  992.       The  result  of  the  execution of  this  comand  depends  on  the 
  993.       emulation flag (byte variable 0C hex).
  994.  
  995.       NEW version (flag=0)
  996.        The line spacing preset with <ESC> "A" [n] is acticvated.
  997.  
  998.       OLD version (flag>0)
  999.        The  line spacing is set to 12*YGRID2.  Using the  default  value of 
  1000.        YGRID2 this gives a line spacing of 1/6 inch.
  1001.  
  1002.  
  1003. 1B 33 [n] 
  1004. <ESC> "3"  [n] 
  1005.       The  line spacing is set to [n]*YGRID,  with YGRID being the  current 
  1006.       grid spacing. The default value for YGRID is 1/216 inch. 
  1007.  
  1008.  
  1009. 0B 
  1010. <VT> 
  1011.       The  cursor moves from its current position to the next vertical  tab 
  1012.       stop. The tab stops can be set with <ESC> "B" [t1] [t2] [t3]...0. The 
  1013.       default vertical tab setting is 1, i.e. on every line.
  1014.  
  1015.  
  1016. 1B 42 [t1] [t2] [t3]...00
  1017.  <ESC> "B" [t1] [t2] [t3]...0 
  1018.       This  code sequence sets the vertical TAB positions on the  specified 
  1019.       lines.  The values [t1],  [t2] etc.  indicate the offset from the top 
  1020.       margin of the page in lines. 
  1021.  
  1022.       For example,  the sequence <ESC> "B" 3 8 0 would set vertical TABs in 
  1023.       lines 4 and 9. These settings are then repeated, so that a third <VT> 
  1024.       command would then move the cursor to line 12,  the fourth to line 17 
  1025.       and so on.
  1026.  
  1027.       The  values  in the list must be arranged  in  ascending  order.  The 
  1028.       sequence  ends  with  the  first  value  that  is  smaller  than  its 
  1029.       predecessor.  Up  to  255  vertical tabulators may be  set  with  the 
  1030.       maximum value of each TAB setting being 255.
  1031.  
  1032.  
  1033. 1B 43 [n]
  1034. <ESC> "C" [n] 
  1035.       Sets  the page length in lines (before deducting the upper and  lower 
  1036.       margin).  The value in [n] must be in the region 1 to 255.  The  page 
  1037.       length  calculation  takes account of the current  line  spacing  and 
  1038.       whether AUTO LINEFEED is enabled.  Whenever data is sent to the  page 
  1039.       buffer, LASERBRAIN checks to see whether the set page length has been 
  1040.       exceeded.  If  the  page end has been reached,  the current  page  is 
  1041.       printed.
  1042.  
  1043.       To  prevent the emulator from automatically printing a  page,  set  a 
  1044.       large  paper  length,  possibly  even longer than  the  actual  paper 
  1045.       length. However, anything that would exceed the physical paper length 
  1046.       will be truncated and lost.
  1047.  
  1048.  
  1049. 1B 43 0 [n]            
  1050. <ESC> "C" 0 [n] 
  1051.       Sets the page length in inches (before deducting the upper and  lower 
  1052.       margin).  The value in [n] must be in the region 1 to  255.  Whenever 
  1053.       data is sent to the page buffer, LASERBRAIN checks to see whether the 
  1054.       set page length has been exceeded.  If the page end has been reached, 
  1055.       the current page is printed.
  1056.  
  1057.       To  prevent the emulator from automatically printing a  page,  set  a 
  1058.       large  paper  length,  possibly  even longer than  the  actual  paper 
  1059.       length. However, anything that would exceed the physical paper length 
  1060.       will be truncated and lost.
  1061.  
  1062.  
  1063. 1B 4E [n] 
  1064. <ESC> "N" [n] 
  1065.       Sets  the  top  of page margin to [n] lines using  the  current  line 
  1066.       spacing.  The top of page margin is deducted form the page length set 
  1067.       with <ESC> "C".
  1068.  
  1069.  
  1070. 1B 72 [n] 
  1071. <ESC> "r" [n] 
  1072.       Sets  the bottom of page margin to [n] lines using the  current  line 
  1073.       spacing.  The top of page margin is deducted form the page length set 
  1074.       with <ESC> "C".
  1075.  
  1076.  
  1077. 1B 4F  
  1078. <ESC> "0" 
  1079.       Resets both the top and bottom margins to zero.
  1080.  
  1081.  
  1082. EXTRA: 1B 01 [n] 
  1083. <ESC> <SOH> [n] 
  1084.       AUTO LINEFEED
  1085.       [n]=0: off 
  1086.       [n]=1: on  
  1087.       If  Auto Linefeed is enabled,  the vertical line spacing consists  of 
  1088.       the  height of the current font plus the current line  spacing.  This 
  1089.       means  that the space between lines of characters  remains  constant, 
  1090.       even if another font is selected.  If Auto Linefeed is disabled, only 
  1091.       the  space  between  the top pixels of each row  of  characters  will 
  1092.       remain constant.
  1093.  
  1094.  
  1095. EXTRA: 1B 09 [m] [n] 
  1096. <ESC> <HT> [m] [n] 
  1097.       Graphics  line  feed.  The cursor is moved down [n] times  the  pixel 
  1098.       height  in graphics mode [m].  Normally,  this command is  used  with 
  1099.       [n]=8,  if you wish to print multiple lines of graphics in such a way 
  1100.       that  no  white lines or stripes show between  those  lines,  without 
  1101.       having to modify the value of YGRID.
  1102.  
  1103.  
  1104. EXTRA: 1B 0B [m] [n]
  1105. <ESC> <VT> [m] [n] 
  1106.       Reverse  graphics  line feed.  The cursor is moved up [n]  times  the 
  1107.       pixel height in graphics mode [m].
  1108.  
  1109.  
  1110.  
  1111. HORIZONTAL POSITIONING
  1112.  
  1113. 08 
  1114. <BS> 
  1115.       Backspace.  The  cursor is moved one character position to the  left. 
  1116.       With  proportionally spaced text the cursor moves back the  width  of 
  1117.       the "blank" character ($20). Since this operation does not delete any 
  1118.       characters,  a  number of characters can be superimposed  using  this 
  1119.       method.
  1120.  
  1121.  
  1122. 09 
  1123. <HT> 
  1124.       The cursor moves from its current position to the next horizontal tab 
  1125.       stop. The tab stops can be set with <ESC> "D" [t1] [t2] [t3]...0. The 
  1126.       default horizontal tab setting is 8,  i.e. every 8thcolumn. The width 
  1127.       of  the  "blank"  character  ($20) in the current  font  is  used  to 
  1128.       determine the width of one character position.
  1129.  
  1130.  
  1131. 1B 44 [t1] [t2] [t3]...00 
  1132.  <ESC> "D" [t1] [t2] [t3]...0  
  1133.       This code sequence sets the horizontal TAB positions on the specified 
  1134.       columns. The values [t1], [t2] etc. indicate the offset from the left 
  1135.       margin  of  the page in columns (one column being the  width  of  the 
  1136.       "blank"  character  ($20) in the  current  font).  
  1137.       
  1138.       For example,  the sequence <ESC> "D" 2 8 0 would set horizontal  TABs 
  1139.       in columns 3 and 9. These settings are then repeated, so that a third 
  1140.       <HT> command would then move the cursor to column 11,  the fourth  to 
  1141.       column 19 and so on.
  1142.  
  1143.       The  values  in the list must be arranged  in  ascending  order.  The 
  1144.       sequence  ends  with  the  first  value  that  is  smaller  than  its 
  1145.       predecessor.  Up  to  255 horizontal tabulators may be set  with  the 
  1146.       maximum value of each TAB setting being 255.
  1147.  
  1148.  
  1149. 0D  
  1150. <CR> 
  1151.       Carriage Return. The cursor is moved to the current left-hand margin. 
  1152.       Single line expanded printing is disabled.
  1153.  
  1154.  
  1155. 1B 6C [n] 
  1156. <ESC> "l" [n] 
  1157.       The  left-hand  page margin is set to the [n]th  column  (one  column 
  1158.       being the width of the "blank" character ($20) in the current font).
  1159.  
  1160.  
  1161. 1B 51 [n] 
  1162. <ESC> "Q" [n] 
  1163.       The  right-hand  page margin is set to the [n]th column  (one  column 
  1164.       being the width of the "blank" character ($20) in the current font).
  1165.  
  1166.  
  1167. 1B 62 [n] 
  1168. <ESC> "b" [n] 
  1169.       Prints [n] spaces, starting at the current cursor position. A "space" 
  1170.       has the width of the "blank" character ($20) in the current font.
  1171.  
  1172.  
  1173. EXTRA: 1B 03 [n] 
  1174. <ESC> <ETX> [n] 
  1175.       Sets  the  proportional spacing between characters to  [n]/300  inch. 
  1176.       This spacing is only used if proportional spacing is enabled.
  1177.  
  1178.       If  proportional spacing is disabled while this command is  executed, 
  1179.       this  setting  will only be effective after proportional  spacing  is 
  1180.       reenabled.
  1181.  
  1182.  
  1183.  
  1184. CHARACTER SETTINGS
  1185.  
  1186. 1B 52 [n] 
  1187. <ESC> "R" [n] 
  1188.       Selects  a  national  character set.  There  are  eight  standardized 
  1189.       versions  of the ASCII character set,  which may be selected by  this 
  1190.       command.  This will result in the substitution of the characters with 
  1191.       the hex codes 23,  40,  5B,  5C,  5D,  5E,  60, 7B, 7C, 7D, 7E by the 
  1192.       characters  of  the  selected national  character  set.  The  default 
  1193.       setting selects the US character set ([n]=0).
  1194.  
  1195. [n]:   0        1        2        3        4        5        6        7
  1196. Code  USA      France   Germany  UK       Denmark  Sweden   Italy    Spain  
  1197. 23     #        £        #        £        #        #        #        #
  1198. 40     @        à        §        @        @        É        §        @
  1199. 5B     [        °        Ä        [        Æ        Ä        °        ¡
  1200. 5C     \        ç        Ö        \        Ø        Ö        ç        Ñ
  1201. 5D     ]        §        Ü        ]        Å        Å        é        ¿
  1202. 5E     ^        ^        ^        ^        ^        Ü        ^        ^
  1203. 60     `        `        `        `        `        é        ù        `
  1204. 7B     {        é        ä        {        æ        ä        à        ¨
  1205. 7C     |        ù        ö        |        ø        ö        ò        ñ
  1206. 7D     }        è        ü        }        å        å        è        }
  1207. 7E     ~        ¨        ß        ~        ~        ü        ì        ~
  1208.  
  1209.       Actually  this  is a surplus command,  because all  characters  maybe 
  1210.       printed directly from the ST's character set (codes > $80).  However, 
  1211.       since  there are programs which rely on said  switch  sequences,  the 
  1212.       emulator supports them.
  1213.  
  1214.  
  1215. 1B 4D 
  1216. <ESC> "M" 
  1217.       Select  Elite print width.  On a standard dot-matrix printer this  is 
  1218.       usually 12 characters per inch.  However,  with LASERBRAIN the  exact 
  1219.       width will depend on the current font.
  1220.  
  1221.  
  1222. 1B 50 
  1223. <ESC> "P" 
  1224.       Select  Pica print width.  On a standard dot-matrix printer  this  is 
  1225.       usually 10 characters per inch.  However,  with LASERBRAIN the  exact 
  1226.       width will depend on the current font.
  1227.  
  1228.  
  1229. 0E    or    1B 0E
  1230. <SO>  or    <ESC> <SO> 
  1231.       Single line expanded printing.  All characters following this code on 
  1232.       the same line are printed enlarged.  This function is cancelled by  a 
  1233.       <LF>,  <CR>,  <FF>, <CAN> or <DC4> code. Do not confuse this with the 
  1234.       Permanent Expanded Print option.
  1235.  
  1236.  
  1237. 14 
  1238. <DC4> 
  1239.       Cancel  single  line  expanded printing.  
  1240.  
  1241.  
  1242. 1B 57 [n] 
  1243. <ESC> "W" [n] 
  1244.       Permanent expanded printing on / off.
  1245.        [n]=0: off
  1246.        [n]=1: on
  1247.  
  1248.  
  1249. 0F    or    1B 0F 
  1250. <SI>  or    <ESC> <SI> 
  1251.       Enable condensed printing.  On a standard dot-matrix printer this  is 
  1252.       usually 17 characters per inch.  However,  with LASERBRAIN the  exact 
  1253.       width will depend on the current font.
  1254.  
  1255.  
  1256. 12 
  1257. <DC2>
  1258.       Cancel condensed printing.
  1259.  
  1260.  
  1261. 1B  34        or     1B 78 01 
  1262. <ESC> "4"     or    <ESC>  "x"  1 
  1263.       Select  LQ (letter quality) mode.  This command exists only  for  the 
  1264.       sake of compatibility with dot-matrix printers.  There is no speed to 
  1265.       be gained on a laserprinter by reducing the quality of the  printout. 
  1266.       For this reason,  this command will only effect a change between  two 
  1267.       different  sets  of fonts,  both  in  letter  quality.  However,  the 
  1268.       corresponding fonts must be installed.  For example, you could switch 
  1269.       between the Elite and the Swiss fonts by loading both font sets  from 
  1270.       the accessory and then choosing the font numbers for the first set of 
  1271.       fonts to correspond to the "draft" mode and the font numbers for  the 
  1272.       second font set to correspond to the "LQ" mode.  By changing  between 
  1273.       "draft" and "LQ" you could thus switch between the two sets of fonts. 
  1274.       LASERBRAIN  defaults to "draft" mode.  For  further  details,  please 
  1275.       refer to the section on Printing with LASERBRAIN.
  1276.  
  1277.  
  1278. 1B 35      or    1B 78 00 
  1279. <ESC> "5"  or   <ESC> "x" 0 
  1280.       Cancel LQ (letter quality) mode. Engage draft mode. Please refer also 
  1281.       to the "Select LQ mode" command above!
  1282.  
  1283.  
  1284. 1B 70 [n]
  1285. <ESC> "p" [n] 
  1286.       Proportional spacing on / off
  1287.        [n]=0: off
  1288.        [n]=1: on
  1289.       
  1290.       For  additional information,  please refer to the  section  Printing 
  1291.       with LASERBRAIN.
  1292.  
  1293.  
  1294. 1B 53 0
  1295. <ESC> "S" 0 
  1296.       Enable Superscript mode.
  1297.  
  1298.  
  1299. 1B 53 1
  1300. <ESC> "S" 1
  1301.       Enable Subscript mode.
  1302.  
  1303.  
  1304. 1B 54 
  1305. <ESC> "T" 
  1306.       Cancel Superscript or Subscript mode.
  1307.  
  1308.  
  1309. 1B 47 
  1310. <ESC> "G" 
  1311.       Enable  double-strike  printing mode.  (Currently identical  to  bold 
  1312.       printing.)
  1313.  
  1314.  
  1315. 1B 48 
  1316. <ESC> "H" 
  1317.       Cancel double-strike printing mode.
  1318.  
  1319.  
  1320. 1B 45 
  1321. <ESC> "E" 
  1322.       Enable bold printing mode.
  1323.  
  1324.  
  1325. 1B 46 
  1326. <ESC> "F" 
  1327.       Cancel bold printing mode.
  1328.  
  1329.  
  1330. 1B 49 [n] 
  1331. <ESC> "I" [n]
  1332.       Italics mode on / off.
  1333.        [n]=0: off
  1334.        [n]=1: on
  1335.  
  1336.  
  1337. 1B 2D [n] 
  1338. <ESC> "-" [n] 
  1339.       Continuous Underlining on / off.
  1340.        [n]=0: off
  1341.        [n]=1: on
  1342.       Unlike  the other seven text effects supported by  the  emulator,  no 
  1343.       individual  character set is required to represent  underlined  text, 
  1344.       i.e. any font can be underlined.
  1345.  
  1346.  
  1347. EXTRA: 1B 02 [n] 
  1348. <ESC> <STX> [n] 
  1349.       Set font:  font number [n] is selected as the current font.  The font 
  1350.       number  is  assigned  to  a font using  the  "font  number"  item  in 
  1351.       LASERBRAIN's configuration accessory.
  1352.  
  1353.       The  current  font  as set by this command will  be  changed  by  any 
  1354.       command that changes print styles or fonts, except for the "Continuous 
  1355.       Underlining" command.
  1356.  
  1357.  
  1358. EXTRA: 1B 07 [n] 
  1359. <ESC> <BEL> [n] 
  1360.       Set  style.   Selects  the  font  which  has  the  eight   attributes 
  1361.       corresponding to the bits set in [n].
  1362.  
  1363.       BIT   set (=1)       reset (=0)
  1364.        7:   italic         normal
  1365.        6:   underlined     normal
  1366.        5:   bold           normal
  1367.        4:   superscript    normal
  1368.        3:   subscript      normal
  1369.        2:   expanded       normal    
  1370.        1:   condensed      normal
  1371.        0:   ELITE (12cpi)  PICA (10 cpi)
  1372.  
  1373.       The bits 0 to 7 correspond to the attributes, which can be set in the 
  1374.       accessory by using the buttons 1 to 8.
  1375.  
  1376.  
  1377.  
  1378. GRAPHICS COMMANDS
  1379.  
  1380. 1B 2A [m] [l] [h] [g]...
  1381. <ESC> "*" [m] [l] [h] [g]...
  1382.       Bit Image Graphics with selectable resolution.  The Bytes [l] and [h] 
  1383.       indicate  the number of bytes of graphics data that will  follow  the 
  1384.       command,  where  [l]  is the least significant and [h]  is  the  most 
  1385.       significant  byte  of an integer word.  Thus,  the  number  of  bytes 
  1386.       calculates as follows: Bytes= 256*[h]+[l]
  1387.  
  1388.       Each byte of graphics data represents 8 pixels in column,  one  above 
  1389.       the other, with bit 7, the most significant bit, being at the top and 
  1390.       bit 0, the least significant bit, being at the bottom of the column:
  1391.  
  1392.                                   o Bit 7
  1393.                                   o Bit 6
  1394.                                   o Bit 5
  1395.                                   o Bit 4
  1396.                                   o Bit 3
  1397.                                   o Bit 2
  1398.                                   o Bit 1
  1399.                                   o Bit 0
  1400.  
  1401.       The  resolution  of the bit image is set using the value  of  [m].  A 
  1402.       total of 16 graphics modes are available:
  1403.  
  1404.       [m]  Name:                        X-Res.    Y-Res.    Interlacing
  1405.       00:  Single Density               1/60"     1/72"     0
  1406.       01:  Double Density               1/120"    1/72"     0
  1407.       02:  Double Density               1/120"    1/72"     0
  1408.       03:  Quadruple Density            1/240"    1/72"     2/216"
  1409.       04:  Screen Resolution I          1/80"     1/72"     0
  1410.       05:  Plot                         1/72"     1/72"     0
  1411.       06:  Screen Resolution II         1/90"     1/72"     0
  1412.               
  1413.       07:  24 Pin Printer - Standard    1/180"    1/180"    0
  1414.       08:  24 Pin Printer - High Res.   1/360"    1/180"    1/360"
  1415.       
  1416.       09:  Laser Printer - Standard     1/300"    1/300"    0
  1417.       0A:  Laser Printer - 1/2 Res.     1/150"    1/150"    0
  1418.       0B:  Laser Printer - 1/3 Res.     1/100"    1/100"    0
  1419.       0C:  Laser Printer - 1/4 Res.     1/75"     1/75"     0
  1420.       0D:  Laser Printer - 1/5 Res.     1/60"     1/60"     0
  1421.       0E:  Metric Resolution I          1 mm      1 mm      0
  1422.       0F:  Metric Resolution II         1/10 mm   1/10 mm   0
  1423.  
  1424.       The preset resolutions and interlacing factor for each mode are shown 
  1425.       in  the table above.  The horizontal and vertical resolutions can  be 
  1426.       defined by the user.  Additionally,  the interlacing factor for  each 
  1427.       mode  can  be set.  This factor defines how much lower one  pixel  is 
  1428.       printed  below the one above it,  resulting in a user  definable  gap 
  1429.       between two pixels,  which is often used with dot-matrix printers  to 
  1430.       obtain  a  higher resolution.  The interlacing mode is  supported  by 
  1431.       LASERBRAIN for reasons of compatibility only.
  1432.  
  1433.       - Modes  0  to 6 are available on 9 pin printers.  Note that  mode  2 
  1434.         normally  differs  from mode 1 in that it provides  reduced  output 
  1435.         quality at  twice  the speed.  The emulator  makes  no  distinction 
  1436.         between the two modes.
  1437.  
  1438.       - Modes 7 and 8 correspond in resolution to a 24 pin printer.
  1439.  
  1440.       - Modes 9 to 13 are based on the basic physical resolution of a laser 
  1441.         printer and are therefore distortion free,  with each pixel  having 
  1442.         an  aspect  ratio of 1 (i.e.  the height of each pixel  is  exactly 
  1443.         equal to its width).
  1444.  
  1445.       - Metric  Modes 14 and 15 are particulary suited for printouts  where 
  1446.         the size of the image has to be reproducted correctly.
  1447.  
  1448.       For  further  information  on using the  emulator's  graphics  modes, 
  1449.       please refer to the section Printing Graphics with LASERBRAIN.
  1450.  
  1451.       The   following  preset  code  sequences  are  identical   to   their 
  1452.       corresponding <ESC> "*" modes.
  1453.  
  1454.  
  1455. 1B 4B [l] [h] [g]... 
  1456. <ESC> "K" [l] [h] [g]... 
  1457.       Single Density (60 dpi). Equivalent to mode 0.
  1458.  
  1459.  
  1460. 1B 4C [l] [h] [g]... 
  1461. <ESC> "L" [l] [h] [g]... 
  1462.       Double Density. Equivalent to mode 1.
  1463.  
  1464.  
  1465. 1B 59 [l] [h] [g]... 
  1466. <ESC> "Y" [l] [h] [g]... 
  1467.       Double Density.  Equivalent to mode 2.  With LASERBRAIN, mode 2 to is 
  1468.       identical to mode 1.
  1469.  
  1470.  
  1471. 1B 5A [l] [h] [g]... 
  1472. <ESC> "Z" [l] [h] [g]... 
  1473.       Quadruple Density. Equivalent to mode 3.
  1474.  
  1475.  
  1476. EXTRA: 1B 04 [m] [n] 
  1477. <ESC> <EOT> [m] [n] 
  1478.       Set Interlace factor: reduces the height of a pixel in bit-image mode 
  1479.       [m]  by [n]*YGRID.  The overall size of the image is not affected  by 
  1480.       this  procedure.  It  simply  creates space "between  the  dots"  for 
  1481.       printing  further dots,  offset vertically,  without causing them  to 
  1482.       overlap. Only values smaller than the pixel height are sensible. If a 
  1483.       finer  setting than multiples of YGRID is required,  the  Interlacing 
  1484.       Grid  Variable  should be set directly.  Default  is  an  interlacing 
  1485.       factor of 0, i.e. adjacent pixels are touching.
  1486.  
  1487.  
  1488. EXTRA: 1B 05 [n]  [b1] [b2] [b3] [b4] 
  1489. <ESC> <ENG> [n]  [b1] [b2] [b3] [b4] 
  1490.       Set the value of the grid variable [n] using the formula:
  1491.  
  1492.        ([b1] [b2] [b3] [b4])/300/65536 inches
  1493.  
  1494.       Where  ([b1]  [b2]  [b3]  [b4]) is  read  as  single  long  word;  b1 
  1495.       represents the most significant byte.
  1496.  
  1497.       Grid  variables  establish  the size ratios used  while  printing  an 
  1498.       image.  By  altering these variables,  LASERBRAIN can be  effectively 
  1499.       customised to meet special requirements.
  1500.  
  1501.       The variables are as follows:
  1502.  
  1503.       [n]  Function                                    default value
  1504.       00:  X-resolution for graphics mode 0            1/60"
  1505.       01:  Y-resolution                                1/72"
  1506.       02:  Interlacing                                 0
  1507.       04:  X-resolution for graphics mode 1            1/120"
  1508.       05:  Y-resolution                                1/72"
  1509.       06:  Interlacing                                 0
  1510.       08:  X-resolution for graphics mode 2            1/120"
  1511.       09:  Y-resolution                                1/72"
  1512.       0A:  Interlacing                                 0
  1513.       0C:  X-resolution for graphics mode 3            1/240"
  1514.       0D:  Y-resolution                                1/72"
  1515.       0E:  Interlacing                                 2/216"
  1516.       10:  X-resolution for graphics mode 4            1/80"
  1517.       11:  Y-resolution                                1/72"
  1518.       12:  Interlacing                                 0
  1519.       14:  X-resolution for graphics mode 5            1/72"
  1520.       15:  Y-resolution                                1/72"
  1521.       16:  Interlacing                                 0
  1522.       18:  X-resolution for graphics mode 6            1/90"
  1523.       19:  Y-resolution                                1/72"
  1524.       1A:  Interlacing                                 0
  1525.       1C:  X-resolution for graphics mode 7            1/180"
  1526.       1D:  Y-resolution                                1/180"
  1527.       1E:  Interlacing                                 0
  1528.       20:  X-resolution for graphics mode 8            1/360"
  1529.       21:  Y-resolution                                1/180"
  1530.       22:  Interlacing                                 1/360"
  1531.       24:  X-resolution for graphics mode 9            1/300"
  1532.       25:  Y-resolution                                1/300"
  1533.       26:  Interlacing                                 0
  1534.       28:  X-resolution for graphics mode 10           1/150"
  1535.       29:  Y-resolution                                1/150"
  1536.       2A:  Interlacing                                 0
  1537.       2C:  X-resolution for graphics mode 11           1/100"
  1538.       2D:  Y-resolution                                1/100"
  1539.       2E:  Interlacing                                 0
  1540.       30:  X-resolution for graphics mode 12           1/75"
  1541.       31:  Y-resolution                                1/75"
  1542.       32:  Interlacing                                 0
  1543.       34:  X-resolution for graphics mode 13           1/60"
  1544.       35:  Y-resolution                                1/60"
  1545.       36:  Interlacing                                 0
  1546.       38:  X-resolution for graphics mode 14           1 mm
  1547.       39:  Y-resolution                                1 mm 
  1548.       3A:  Interlacing                                 0    
  1549.       3C:  X-resolution for graphics mode 15           1/10 mm
  1550.       3D:  Y-resolution                                1/10 mm
  1551.       3E:  Interlacing                                 0
  1552.  
  1553.       40:  YGRID: vertical microspacing step size      1/216"
  1554.       41:  YGRID2: vertical line spacing step size     1/72"
  1555.       42:  LINE FEED                                   1/6"
  1556.  
  1557.       Three successive grid variables are used to define the parameters for 
  1558.       a  graphics mode.  The following formula is useful in  obtaining  the 
  1559.       grid variable numbers that represent a specific graphics mode:
  1560.  
  1561.        X-resolution for graphics mode [m] = variable number [m] * 4 
  1562.        Y-resolution for graphics mode [m] = variable number [m] * 4 + 1
  1563.        Interlacing  for graphics mode [m] = variable number [m] * 4 + 2
  1564.  
  1565.       Variable  numbers  greater  than  hexadecimal  42  (66  decimal)  are 
  1566.       ignored.  The variables with the numbers 03,  07,  0B,  0F ... 3B, 3F  
  1567.       are reserved for future expansion and should not be used.
  1568.  
  1569.       If  a graphics mode is set to a resolution of more than 300 dots  per 
  1570.       inch,  LASERBRAIN will have to scale down the image during  printout. 
  1571.       This will inevitable result in the loss of some detail.  If the image 
  1572.       has to be enlarged (i.e. the resolution is set to less than 300 dpi), 
  1573.       the resulting printout will be coarsened.
  1574.  
  1575.       Note:  A  single pixel may not be wider than 16 laser pixels  (16/300 
  1576.              inch).
  1577.  
  1578.       Example:
  1579.       Let  us  assume  that  you want to  set  the  vertical  resolution of 
  1580.       graphics  mode M to Y dots per inch.  An example in  GFA Basic  would 
  1581.       look like this:
  1582.       
  1583.        LPRINT CHR$(&1B);CHR$(5);CHR$(M*4+1);MKL$(300*65536/Y)
  1584.  
  1585.       The  MKL$  function  turns the number passed to  it  into  a   string 
  1586.       representing  the four bytes of a long word,  most  significant  byte 
  1587.       first.
  1588.  
  1589.       The  Basic line above will send the sequence 1B 05 14 00 03 C0 00  to 
  1590.       the  emulator,  setting  variable  number  20  (the  x-resolution  of 
  1591.       graphics  mode 5) to $00*256+$03*1+$C0/256+$00/65536 =  3.75  .  This 
  1592.       means that every pixel in graphics mode 5 will be printed 3.75  laser 
  1593.       pixels wide,  thus resulting in a horizontal resolution of 3.75/300 = 
  1594.       1/80 inch.
  1595.    
  1596.  
  1597. EXTRA: 1B 7F [a4][a3][a2][a1] [x2][x1] [y2][y1] 
  1598. <ESC> <DEL> [a4][a3][a2][a1] [x2][x1] [y2][y1] 
  1599.       Insert Bit-Map Graphics.  This command sequence can be used to insert 
  1600.       a bit-map graphics into a page, where [a4][a3][a2][a1] is a long word 
  1601.       that  contains  the  address  of the bit-map  in  your  ST's  memory. 
  1602.       [x2][x1]  is the width and [y2][y1] is the height of the  bit  image. 
  1603.       LASERBRAIN will NOT copy the bit image into its buffer, but will only 
  1604.       memorize the command sequence.  The actual bit-map is copied into the 
  1605.       page at the time of the printout. This helps to save buffer space but 
  1606.       implies  that the bit-image must remain in memory until it  has  been 
  1607.       printed.  
  1608.  
  1609.       Further conditions:
  1610.       
  1611.        - the width of the bit-map must be given in multiples of 16
  1612.  
  1613.        - the  width  of  the  graphics may  not  exceed  the  paper  width, 
  1614.          otherwise  the part of the image that exceeds the right margin  of 
  1615.          the page will be "rotated" to the left margin of the page.
  1616.  
  1617.        - the  bit-map will be inserted into the page at the current  cursor 
  1618.          position.  If the x-coordinate of the cursor is a multiple of  16, 
  1619.          then  LASERBRAIN will be able to achive a much  higher  processing 
  1620.          speed  and use only little buffer space during  printout.  If  the 
  1621.          cursor position  does not meet this condition,  more buffer  space 
  1622.          will be required.
  1623.  
  1624.       Example: (GFA-BASIC)
  1625.       
  1626.       'Put screen as bit-map onto the page
  1627.       DEFLINE 1,1
  1628.       FOR w=0 TO 2*PI STEP 2*PI/360
  1629.        DRAW 320,200 TO 320+200*SIN(w),200+200*COS(w)
  1630.       NEXT w
  1631.       DEFLINE 1,20,1,1
  1632.       DRAW 0,0 TO 639,399
  1633.       LPRINT "Screen Dump with LASERBRAIN:"
  1634.       ' insert screen ino page
  1635.       LPRINT CHR$(&H1B);CHR$(&H7F);MKL$(XBIOS(3));MKI$(640);MKI$(400);
  1636.       ' one more time...
  1637.       LPRINT STRING$(16," ");
  1638.       LPRINT CHR$(&H1B);CHR$(&H7F);MKL$(XBIOS(3));MKI$(640);MKI$(400)
  1639.       ' print page (FORM FEED)
  1640.       LPRINT CHR$(12);
  1641.  
  1642.  
  1643.  
  1644. OTHER COMMANDS
  1645.             
  1646. 18
  1647. <CAN> 
  1648.       Deletes  the  current  line from the print  buffer  and  cancels  the 
  1649.       single-line expanded print mode.
  1650.       
  1651.  
  1652. 7F 
  1653. <DEL> 
  1654.       Deletes the last character from the buffer.  This has the same effect 
  1655.       as if the character had not been sent at all.
  1656.  
  1657.  
  1658. 1B 40
  1659. <ESC> "@" 
  1660.       Printer Initialisation. All of LASERBRAIN's adjustable parameters are 
  1661.       reset to their default values.
  1662.  
  1663.  
  1664. EXTRA: 1B 06 [n][b] 
  1665. <ESC> <ACK> [n][b] 
  1666.       Set  byte  variable  [n] to value [b].  Byte variables  are  used  to 
  1667.       control various functions of the emulator.  Since byte variables  are 
  1668.       user  adjustable,  they  can be used to customize  LASERBRAIN  for  a 
  1669.       particular purpose.
  1670.  
  1671.       The variables are as follows:
  1672.  
  1673.       [n]   Function                                         default value
  1674.       00:   current font                                         01    
  1675.       01:   current style                                        00
  1676.       02:   font number for LQ off and prop. spacing off         01     
  1677.       03:   font number for LQ on  and prop. spacing off         02
  1678.       04:   font number for LQ off and prop. spacing on          03
  1679.       05:   font number for LQ on  and prop. spacing on          04
  1680.       06:   index to byte variables 02 to 05                     00
  1681.       07:   mask for style reset on <CR>                         FF
  1682.       08:   AUTO LINE FEED enabled if >0                         00
  1683.       09:   automatic <LF> after <CR> if >0                      00
  1684.       0A:   number of copies per page                            01          
  1685.       0B:   character spacing with prop. spacing enabled         05
  1686.       0C:   emulation flag (=0: new | >0: old)                   01
  1687.  
  1688.       Other variable numbers will be ignored.
  1689.  
  1690.       Function:
  1691.       00, 01:  are  used  internally  during  font  selection.   Especially 
  1692.                commands  that  select or deselect LQ mode  or  proportional 
  1693.                spacing will cause variable 0 to be set with the value found 
  1694.                in the byte variable that variable  number 6 is pointing  to 
  1695.                (02 to 05). 
  1696.  
  1697.                You  should not alter the byte varibles 00 and 01  directly, 
  1698.                but   by  using  the  SET  FONT  and  SET   STYLE   commands 
  1699.                respectively.  Setting  the  byte variables  only  will  not 
  1700.                activate the corresponding font.
  1701.  
  1702.                For  the  usage of the bits in variable  number  01,  please 
  1703.                refer to the figure in the section on "SET STYLE".
  1704.  
  1705.       02..05:  contain the numbers of the fonts which shall be used for the 
  1706.                respective  combinations  of  LQ  and  proportional  spacing 
  1707.                on/off.  By  setting  the  variables  02  to  05  the  fonts 
  1708.                associated with the different combinations can be  redefined 
  1709.                without having to use the accessory.
  1710.  
  1711.       06:      LQ on/off sets/resets bit 0 of this variable.
  1712.                Prop. spacing on/off sets/resets bit 1 of this variable.
  1713.  
  1714.                This variable is used as pointer to byte variables 02 to 06, 
  1715.                which  contain the numbers of the fonts to be used  for  the 
  1716.                selected combination of LQ mode and prop. spacing on/off. To 
  1717.                calculate  where variable 06 is pointing to,  add 2  to  the 
  1718.                value  of it,  i.e.  if the value of variable 06  is  0,  it 
  1719.                points to variable number 2.
  1720.  
  1721.       07:      Mask  for  style reset at the end of line  (<CR>,  <CAN>  or 
  1722.                <FF>).  If a bit of this variable is reset,  i.e. contains a 
  1723.                zero,  then  the option corresponding to that  bit  position 
  1724.                will  be  reset by any of the three codes  mentioned  above. 
  1725.                Thus,  this option is disenabled when variable 07 contains a 
  1726.                value of $FF (255 decimal), which is also the default.         
  1727.           
  1728.                Here is a list of the bit positions and the font styles they 
  1729.                represent:
  1730.  
  1731.                BIT                 
  1732.                7:   italic         
  1733.                6:   underlined    
  1734.                5:   bold           
  1735.                4:   superscript 
  1736.                3:   subscript   
  1737.                2:   expanded       
  1738.                1:   condensed 
  1739.                0:   ELITE (12cpi) (if reset: PICA (10 cpi))
  1740.  
  1741.                Example:
  1742.                To select a single line italics printing,  you would have to 
  1743.                set  Bit 7 of variable 07 to zero.  This is done  easily  by 
  1744.                doing  a bitwise AND with a mask of $7F (all bits but bit  7 
  1745.                set). The GFA-BASIC should illustrate the procedure.
  1746.  
  1747.                LPRINT CHR$(&H1B);"M";CHR$(1);      
  1748.                LPRINT CHR$(&H1B),CHR$(5),CHR$(7),CHR$(&H7F)
  1749.  
  1750.       08:      AUTO LINE FEED flag   (0= off, 1= on)
  1751.  
  1752.       09:      If this variable contains a non-zero value,  LASERBRAIN will 
  1753.                add a line feed (LF) whenever it receives a carriage  return 
  1754.                <CR>.
  1755.  
  1756.       0A:      defines the number of copies per page,  excluding hardcopies 
  1757.                (always printed once).  Default is 01,  one copy per page. A 
  1758.                value of 0 in this variable would print 256 copies per page.
  1759.  
  1760.       0B:      Spacing   between  characters  with   proportional   spacing 
  1761.                enabled. The value of this variable defines the width of the 
  1762.                blank  space  between  two  characters,   when  proportional 
  1763.                spacing  is  enabled,  in laser pixels (one laser  pixel  is 
  1764.                1/300 of an inch wide).
  1765.  
  1766.                Changes  made to this variable will not be  effective  until 
  1767.                the  next  "proportional spacing on"  command  is  executed. 
  1768.                Normally, you should not set this variable directly, but use 
  1769.                the  "Set  proportional character spacing"  command  (1B  03 
  1770.                [n]).  
  1771.  
  1772.       0C:      Emulation Flag.  The established "standard" for (9-pin) dot-
  1773.                matrix  printers is not as "standardized" as it  should  be. 
  1774.                Two major versions of the "standard" do exist,  one slightly 
  1775.                differing  from  the  other.  The  major  part  of  existing 
  1776.                software supports the old version.  The differences  between 
  1777.                the  old and new versions concern the interpretation of  the 
  1778.                codes  1B 41 [n] and 1B 32,  please refer to the section  on 
  1779.                these  to  codes  for  details.   If  you  should  encounter 
  1780.                problems with a faulty line spacing, this setting might need 
  1781.                adjustment.  The new version is selected when this  variable 
  1782.                contains a value of zero,  otherwise the old version will be 
  1783.                enabled.  
  1784.  
  1785.  
  1786. EXTRA: 1B 08 
  1787. <ESC> <BS> 
  1788.       Clear  buffer.  The current contents of the page buffer  are  cleared 
  1789.       without printing the page.
  1790.  
  1791.  
  1792. ESCAPE SEQUENCES - OVERVIEW
  1793.  
  1794.  
  1795. 08                  Backspace. The cursor is moved one character position to the left.
  1796. 09                  Horizontal TAB.  The cursor moves from its current position to  the 
  1797.                     next horizontal tab stop.
  1798. 0A                  Line Feed
  1799. 0B                  Vertical TAB.  The cursor  moves from its current position  to  the 
  1800.                     next vertical tab stop.
  1801. 0C                  Form Feed. Prints the current page and clears it from the buffer.
  1802. 0D                  Carriage Return.
  1803. OE                  Single Line Expanded Printing ON.
  1804. 0F                  Condensed Printing On.
  1805. 12                  Condensed Printing Off.
  1806. 14                  Single Line Expanded Printing OFF.
  1807. 18                  Delete Current Line.
  1808. 7F                  Delete Character. The last character is deleted from the buffer.
  1809.  
  1810. 1B 01 [n]           AUTO LINE FEED ON (n=1) / OFF (n=0)
  1811. 1B 02 [n]           Set Font: font number [n] is selected as the current font.
  1812. 1B 03 [n]           Sets the proportional spacing between characters to [n]/300 inch.
  1813. 1B 04 [m][n]        Set Interlace factor:  reduces the height of a pixel in  bit-image 
  1814.                     mode [m] by [n]*YGRID
  1815.  
  1816. 1B 05 [v] [b1][b2][b3][b4] 
  1817.        |            Sets the value of the grid variable [n] using the formula:
  1818.        |            ([b1] [b2] [b3] [b4])/300/65536 inches
  1819.       00            X-resolution for graphics mode 0
  1820.       01            Y-resolution for graphics mode 0
  1821.       02            Interlacing  for graphics mode 0
  1822.       04..3F        X-res. , Y-res. and Interlacing for graphics modes 1...15
  1823.       40:           YGRID: vertical microspacing step size
  1824.       41:           YGRID2: vertical line spacing step size
  1825.       42:           LINE FEED: step size for <LF> command
  1826.  
  1827. 1B 06 [v] [n]       Sets byte variable [v] to [n] 
  1828.        |                                  
  1829.       00            current font    
  1830.       01            current style
  1831.       02            font number for LQ off and prop. spacing off
  1832.       03            font number for LQ on  and prop. spacing off
  1833.       04            font number for LQ off and prop. spacing on
  1834.       05            font number for LQ on  and prop. spacing on
  1835.       06            index to byte variables 02 to 05
  1836.       07            mask for style reset on <CR>
  1837.       08            AUTO LINE FEED enabled if >0
  1838.       09            automatic <LF> after <CR> if >0
  1839.       0A            number of copies per page
  1840.       0B            character spacing with prop. spacing enabled
  1841.       0C            emulation flag (=0: new | >0: old)
  1842.       
  1843. 1B 07 [n]           Set  Style.  Selects  the  font  which  has  the  eight  attributes 
  1844.                     corresponding to the bits set in [n].
  1845. 1B 08               Clear Buffer.  The current contents of the page buffer are  cleared 
  1846.                     without printing the page.
  1847. 1B 09 [m] [n]       Graphics  Line Feed.  The cursor is moved down [n] times the  pixel 
  1848.                     height in graphics mode [m].
  1849. 1B 0A               Reverse Line Feed.  The cursor is moved up one line.
  1850. 1B 0B [m] [n]       Reverse  Graphics Line Feed.  The cursor is moved up [n] times  the 
  1851.                     pixel height in graphics mode [m].
  1852. 1B 0E               Single Line Expanded Printing ON (same as 0E )
  1853. 1B 0F               Condensed Printing ON (same as 0F )
  1854.  
  1855. 1B 2A [m] [l] [h] [g]...
  1856.        |            Selects  graphics  mode [m].  [l] and [h] indicate  the  number  of 
  1857.        |            graphic data bytes [g] which will follow the command.
  1858.        |
  1859.        |
  1860.        |   Name:                        X-Res.    Y-Res.    Interlacing
  1861.       00:  Single Density               1/60"     1/72"     0
  1862.       01:  Double Density               1/120"    1/72"     0
  1863.       02:  Double Density               1/120"    1/72"     0
  1864.       03:  Quadruple Density            1/240"    1/72"     2/216"
  1865.       04:  Screen Resolution I          1/80"     1/72"     0
  1866.       05:  Plot                         1/72"     1/72"     0
  1867.       06:  Screen Resolution II         1/90"     1/72"     0
  1868.               
  1869.       07:  24 Pin Printer - Standard    1/180"    1/180"    0
  1870.       08:  24 Pin Printer - High Res.   1/360"    1/180"    1/360"
  1871.       
  1872.       09:  Laser Printer - Standard     1/300"    1/300"    0
  1873.       0A:  Laser Printer - 1/2 Res.     1/150"    1/150"    0
  1874.       0B:  Laser Printer - 1/3 Res.     1/100"    1/100"    0
  1875.       0C:  Laser Printer - 1/4 Res.     1/75"     1/75"     0
  1876.       0D:  Laser Printer - 1/5 Res.     1/60"     1/60"     0
  1877.       0E:  Metric Resolution I          1 mm      1 mm      0
  1878.       0F:  Metric Resolution II         1/10 mm   1/10 mm   0
  1879.  
  1880.       (The table above shows the default values for the graphic modes)
  1881.  
  1882. 1B 2D [n]           Underlining ON (n=1) / OFF (n=2)
  1883. 1B 30               Set LF to 27*YGRID (1/8")
  1884. 1B 31               Set LF to 21*YGRID (7/72")
  1885. 1B 32               Set LF as set by 1B 41 [n].  The result of this command depends  on 
  1886.                     the condition of the emulation flag.
  1887. 1B 33 [n]           Set LF to [n] * YGRID ([n]/216")
  1888. 1B 34               Letter Quality (LQ) mode ON
  1889. 1B 35               Letter Quality (LQ) mode OFF
  1890. 1B 40               Printer Initialisation
  1891. 1B 41 [n]           The line spacing is preset to to [n]*YGRID2. 
  1892.                     NEW version (emulation flag = 0 ):
  1893.                      This preset must be activated with <ESC> "2" !
  1894.                     OLD version (emulation flag > 0 ):
  1895.                      The setting will be effective imediately.
  1896. 1B 42 [t1][t2]..00  Set Vertical TAB Stops          
  1897. 1B 43 [n]           Set Page Length to [n] lines per page
  1898. 1B 43 0 [n]         Set Page Length to [n] inches
  1899. 1B 44 [t1][t2]..00  Set Horizontal TAB Stops
  1900. 1B 45               Bold Printing ON
  1901. 1B 46               Bold Printing OFF
  1902. 1B 47               Double-Strike Printing ON  (identical to BOLD ON)
  1903. 1B 48               Double-Strike Printing OFF
  1904. 1B 49 [n]           Italics ON (n=1) / OFF (n=0)
  1905. 1B 4A [n]           Micro Line Feed.  The cursor moves down [n]*YGRID, with YGRID being 
  1906.                     the current grid spacing.
  1907. 1B 4B [l][h] [g]... Graphics Mode 0: single density (60 dpi)
  1908. 1B 4C [l][h] [g]... Graphics Mode 1: double density (120 dpi)
  1909. 1B 4D               Select Elite print width (12 cpi)
  1910. 1B 4E [n]           Sets the top of page margin to  [n] lines using  the  current  line 
  1911.                     spacing
  1912. 1B 4F               Resets both the top and bottom margins to zero
  1913. 1B 50               Select Pica print width (10 cpi)
  1914. 1B 51 [n]           The right-hand page margin is set to the [n]th column
  1915. 1B 52 [n]           Select national character set 0...7
  1916. 1B 53 [n]           Superscript ON (n=1) or Subscript ON (n=0)
  1917. 1B 54               Superscript / Subscript OFF
  1918. 1B 57 [n]           Expanded Printing ON (n=1) / OFF (n=0)
  1919. 1B 59 [l][h] [g]... Graphics Mode 2: double density (120 dpi)
  1920. 1B 5A [l][h] [g]... Graphics Mode 3: quadruple density (240 dpi)
  1921. 1B 61 [n]           [n] line feeds 
  1922. 1B 62 [n]           [n] blanks (spaces)
  1923. 1B 6A [n]           Reverse Micro Line Feed.  The cursor moves up [n]*YGRID, with YGRID 
  1924.                     being  the current grid spacing.
  1925. 1B 6C [n]           The left-hand page margin is set to the [n]th column
  1926. 1B 70 [n]           Proportional Spacing ON (n=1) / OFF (n=0)
  1927. 1B 72 [n]           Sets the bottom of page margin to  [n] lines using the current line  
  1928.                     spacing
  1929. 1B 78 [n]           Letter Quality (LQ) mode ON (n=1) / OFF (n=0)
  1930.  
  1931.